﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TestProject1.MainClasses
{
    public class User
    {
        int id_user = 0;
        string name = "";
        string login = "";
        string pass = "";
        string email = "";
        char sex = '\0';
        Role role = null;
        Departament dep = null;

        public void SetID(int i) { this.id_user = i; }
        public void SetName(string a) { this.name = a; }
        public void SetLogin(string b) { this.login = b; }
        public void SetPass(string c) { this.pass = c; }
        public void SetEmail(string d) { this.email = d; }
        public void SetSex(char e) { this.sex = e; }
        public void SetRole(Role r) { this.role = r; }
        public void SetDep(Departament deprt) { this.dep = deprt; }

        public int GetID() { return this.id_user; }
        public string GetName() { return this.name; }
        public string GetLogin() { return this.login; }
        public string GetPass() { return this.pass; }
        public string GetEmail() { return this.email; }
        public char GetSex() { return this.sex; }
        public Role GetRole() { return this.role; }
        public Departament GetDep() { return this.dep; }



        public User add(int id, string a1, string a2, string a3, string a4, char a5, Role r, Departament dep1)
        {
            this.id_user = id;
            this.SetName(a1);
            this.SetLogin(a2);
            this.SetPass(a3);
            this.SetEmail(a4);
            this.SetSex(a5);
            this.SetRole(r);
            this.SetDep(dep1);
            return this;
        }
        public User edit(int i1, string b1, string b2, string b3, string b4, char b5, Role r1, Departament dep1)
        {
            this.SetID(i1);
            this.SetName(b1);
            this.SetLogin(b2);
            this.SetPass(b3);
            this.SetEmail(b4);
            this.SetSex(b5);
            this.SetRole(r1);
            this.SetDep(dep1);
            return this;
        }
        void del() { }
        void selectByDepartment() { }
        void selectByRole() { }
    }
}